package org.mfoyou.agent.center.dao.inf;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.mfoyou.agent.common.dao.domain.HuawuServiceUserCoupon;
import org.mfoyou.agent.common.dao.domain.HuawuServiceUserCouponExample;

public interface HuawuServiceUserCouponMapper {
    int countByExample(HuawuServiceUserCouponExample example);

    int deleteByExample(HuawuServiceUserCouponExample example);

    int deleteByPrimaryKey(Integer touchId);

    int insert(HuawuServiceUserCoupon record);

    int insertSelective(HuawuServiceUserCoupon record);

    List<HuawuServiceUserCoupon> selectByExample(HuawuServiceUserCouponExample example);

    HuawuServiceUserCoupon selectByPrimaryKey(Integer touchId);

    int updateByExampleSelective(@Param("record") HuawuServiceUserCoupon record, @Param("example") HuawuServiceUserCouponExample example);

    int updateByExample(@Param("record") HuawuServiceUserCoupon record, @Param("example") HuawuServiceUserCouponExample example);

    int updateByPrimaryKeySelective(HuawuServiceUserCoupon record);

    int updateByPrimaryKey(HuawuServiceUserCoupon record);

    int checkCouponCount(@Param("couponId") Integer couponId, @Param("count") Integer count);

    /**
     * 激活指定id优惠券
     *
     * @param touchId
     * @return
     */
    int activationUserCouponByPrimaryKey(Integer touchId);


    /**
     * 根据用户id和优惠券状态查询用户优惠券列表
     *
     * @param userId
     * @param touchState
     * @return
     */
    List<HuawuServiceUserCoupon> queryUserCouponByUserIdAndCouponState(@Param("userId") Integer userId, @Param("touchState") Integer touchState);
}